/**
 * 
 */
package com.rd.sys.dto.commmon.enums;

import baseproj.inter.Message;

/**
 * @author
 */
public class OperateLogEnum {
    /**
     * User
     */
    public enum User implements BaseLogEnum {
        // ----------------User
        USER_USERINFO_ADD("1001", Message.getMessage("user.info.add"), Message.getMessage("user.info.log.add")),
        //
        USER_USERINFO_DEL("1002", Message.getMessage("user.info.del"), Message.getMessage("user.info.log.del")),
        //
        USER_USERINFO_EDIT("1003", Message.getMessage("user.info.edit"), Message.getMessage("user.info.log.edit")),
        // ----------------Subscription
        USER_SUB_ADD("1004", Message.getMessage("user.subscription.add"), Message
                .getMessage("user.subscription.log.add")),
        //
        USER_SUB_DEL("1005", Message.getMessage("user.subscription.del"), Message
                .getMessage("user.subscription.log.del")),
        //
        USER_SUB_EDIT("1006", Message.getMessage("user.subscription.edit"), Message
                .getMessage("user.subscription.log.edit")),
        //
        USER_SUB_DEL_ACTIVECODE("1007", Message.getMessage("user.subscription.del.activecode"), Message
                .getMessage("user.subscription.log.del.activecode"));

        /** The code. */
        public String code;

        /** The name. */
        public String name;

        /** The logMsg. */
        public String logMsg;

        /**
         * Instantiates a new user.
         * 
         * @param code
         *            the code
         * @param name
         *            the name
         * @param logMsg
         *            the log msg
         */
        User(String code, String name, String logMsg) {
            this.code = code;
            this.name = name;
            this.logMsg = logMsg;
        }

        /**
         * Equals.
         * 
         * @param value
         *            the value
         * @return true, if successful
         * @version
         */
        public boolean equals(String value) {
            return this.code.equals(value);
        }

        /**
         * Gets the code.
         * 
         * @return the code
         */
        @Override
        public String getCode() {
            return code;
        }

        /**
         * Gets the name.
         * 
         * @return the name
         */
        @Override
        public String getName() {
            return name;
        }

        /**
         * @return the logMsg
         */
        @Override
        public String getLogMsg() {
            return logMsg;
        }
    }

    /**
     * System
     */
    public enum System implements BaseLogEnum {
        // ----------------SYSTEM LOGIN
        // 登录
        SYS_LOGIN("2001", Message.getMessage("sys.login.log.login.name"), Message.getMessage("sys.login.log.login")),
        // 注销
        SYS_LOGOUT("2002", Message.getMessage("sys.login.log.logout.name"), Message.getMessage("sys.login.log.logout")),
        // 修改系统参数
        SYSTEM_SYSPARAM_EDIT("2003", Message.getMessage("sys.syscfg.log.edit.name"), Message
                .getMessage("sys.syscfg.log.edit")),
        // ----------------ROLE
        // 新增角色
        OPERATOR_ROLE_ADD("2004", Message.getMessage("sys.role.add"), Message.getMessage("sys.role.log.add")),
        // 修改角色
        OPERATOR_ROLE_EDIT("2005", Message.getMessage("sys.role.edit"), Message.getMessage("sys.role.log.edit")),
        // 删除角色
        OPERATOR_ROLE_DEL("2006", Message.getMessage("sys.role.del"), Message.getMessage("sys.role.log.del")),
        // ----------------OPERATOR
        // 新增操作员
        OPERATOR_OPERATOR_ADD("2007", Message.getMessage("sys.operator.add"), Message
                .getMessage("sys.operator.log.add")),
        // 修改操作员
        OPERATOR_OPERATOR_EDIT("2008", Message.getMessage("sys.operator.edit"), Message
                .getMessage("sys.operator.log.edit")),
        // 删除操作员
        OPERATOR_OPERATOR_DEL("2009", Message.getMessage("sys.operator.del"), Message
                .getMessage("sys.operator.log.del")),
        // 修改操作员密码
        OPERATOR_OPERATOR_EDITPWD("2010", Message.getMessage("sys.operator.edit.pwd"), Message
                .getMessage("sys.operator.log.edit.pwd"));

        /** The code. */
        public String code;

        /** The name. */
        public String name;

        /** The logMsg. */
        public String logMsg;

        /**
         * Instantiates a new system.
         * 
         * @param code
         *            the code
         * @param name
         *            the name
         * @param logMsg
         *            the log msg
         */
        System(String code, String name, String logMsg) {
            this.code = code;
            this.name = name;
            this.logMsg = logMsg;
        }

        /**
         * Equals.
         * 
         * @param value
         *            the value
         * @return true, if successful
         * @version
         */
        public boolean equals(String value) {
            return this.code.equals(value);
        }

        /**
         * Gets the code.
         * 
         * @return the code
         */
        @Override
        public String getCode() {
            return code;
        }

        /**
         * Gets the name.
         * 
         * @return the name
         */
        @Override
        public String getName() {
            return name;
        }

        /**
         * @return the logMsg
         */
        @Override
        public String getLogMsg() {
            return logMsg;
        }
    }
}
